/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.purpose.service.api;

import org.springframework.web.multipart.MultipartFile;
import org.swan.bean.MessageBean;

import com.koron.common.bean.StaffBean;
import com.koron.purpose.bean.ContractQueryBean;
import com.koron.purpose.bean.PurposeContractBean;

public interface PurposeContractService {
	/**
	 * 责任书制定
	 * @param bean
	 * @param user
	 * @param title
	 * @param note
	 * @return
	 */
	MessageBean<?> insert(PurposeContractBean bean,StaffBean user,String title,String note);
	/**
	 * 责任书删除
	 * @param id
	 * @return
	 */
	MessageBean<?> delete(String id);
	/**
	 * 责任书修改
	 * @param bean
	 * @param user
	 * @return
	 */
	MessageBean<?> update(PurposeContractBean bean,StaffBean user); 
	/**
	 * 查询详情
	 * @param id
	 * @return
	 */
	MessageBean<PurposeContractBean> queryById(String id);
	
	/**
	 * 查询列表
	 * @param queryBean
	 * @return
	 */
	MessageBean<?> list(ContractQueryBean queryBean);
	
	/**
	 * 签署 
	 * @param id
	 * @param file
	 * @param user
	 * @return
	 * 
	 * 作废
	 */
	MessageBean<?> signed(String id,MultipartFile file,StaffBean user);
	/**
	 * 责任书制定提交流程
	 * @param id
	 * @param user
	 * @param title
	 * @param note
	 * @return
	 */
	MessageBean<?> submit(String id,StaffBean user,String title,String note);
	
	/**
	 * 责任书下发
	 * @param id
	 * @param partyA
	 * @param partyB
	 * @param staffMsgs 责任人，JSON数组字符串[{staffCode:'001',staffName:'xxx'}]
	 * @return
	 */
	MessageBean<?> sign(StaffBean user,String id,String partyA,String partyB,String staffMsgs);

	/**
	 * 查询列表
	 * @param queryBean
	 * @return
	 */
	MessageBean<?> signList(StaffBean user, ContractQueryBean queryBean);

	/**
	 * 责任书制定批量提交
	 * @param purposeContractIds 责任书档案ID字符串(多个以逗号分隔)
	 * @param purposeContractType 责任书制定类型(1-集团、2-片区、3-公司、4-部门、5-厂站、6-班组)
	 * @param personCode 流程第一个节点审批人code
	 * @return
	 */
	MessageBean batchSubmit(StaffBean user, String purposeContractIds, Integer purposeContractType, String personCode);
}
